# SDN Testing Config File
# Python syntax
import os

#Global
system_home = os.path.split(os.path.dirname(os.path.realpath(__file__)))[0]
log_path = "/home/agentmanager/SDNST"
logs_loc = log_path + "/log/inst{instance}.log"
enable_stat = True

#Topology
topo_switches = 3
topo_hosts = 4
topo_ports_per_sw = 3
topo_controllers = 1

#Coordinator Section
coordinator_port = 3333
coord_log = log_path + "/log/coordinator.log"
coord_results_log = log_path + "/log/results.log"
coord_strategies_log= log_path + "/log/strategies.log"#@modified
coord_test_controllers = range(0,topo_controllers)
#coord_test_switches = range(1,topo_switches+1)
coord_test_switches = [1,2]
coord_test_list_iters = topo_ports_per_sw
coord_test_case = "sudo python /home/ljw2/test1.py"#@modified
coord_checkpoint_file = log_path + "/log/checkpoint.ck"

#Proxy Section
proxy_path = system_home + "/switch_proxy/sw_proxy"
ctl_path = system_home + "/switch_proxy/sndcmd"
proxy_addr = "192.168.1.177"#@modified
proxy_base_port = 1025
proxy_com_port = 1100

#Mininet Section
mininet_user = "ljw2" #@modified
mininet_addr = "192.168.1.123" #@modified
mininet_passwd = "nn" #modified
mininet_cleanup_cmd = "mn -c"
mininet_replace_scripts = True
mininet_fail_mode = "secure"

#Controller Section
controller_type = "ryu"
controller_addr = "192.168.1.108"#@modified
controller_user = "ljw" #@modified
controller_passwd="nn" #modified
controller_port = 6633
controllers_per_instance = topo_controllers
topo_discovery_delay = 15

#VeriFlow Section
veriflow_enabled = False
veriflow_path = system_home + "/veriflow/VeriFlow/VeriFlow"
veriflow_topo_path = system_home + "/mininet_scripts/"
veriflow_log_path = system_home + "/tmp/"
veriflow_log_name = "veriflow.log.{instance}"
veriflow_base_port = 2048

vm_ssh_key = system_home + "/config/id_rsa" #@modified

# Proecss Monitor Config
stat_baseline_nrounds = 4  # How many times to repeat baselining.
stat_baseline_alg = 'max'  # Either 'mean' or 'max'
stat_rebase_threshold = 0.1 # Rebase when stat is within +/- 10% of threshold.

stat_switch_multipliers = {
    'cpu_sec': 2.0,
}

stat_controller_multipliers = {
    'cpu_sec': 2.0,
}
